package com.springcloud.service;

import com.springcloud.entity.Dept;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class DeptClientServiceFallbackFactory implements FallbackFactory<DeptClientService> {
 @Override
 public DeptClientService create(Throwable throwable) {
  return new DeptClientService() {
   @Override
   public Dept get(long id) {
    return null;
   }

   @Override
   public List<Dept> list() {
    return null;
   }

   @Override
   public boolean add(Dept dept) {
    return false;
   }
  };
 }
}
